<?php 
require_once 'kelas/fungsi.php';
require_once 'kelas/amankanParam.php';
require_once 'kelas/record.php';
require_once 'kelas/customer.php';
$dtGet = $objParamAman->getMethod();
$dtPost=$objParamAman->postMethod();
if(!isset($_SESSION['userlogin']['id']))exit($objFungsi->alert('Silahkan Login Dahulu').$objFungsi->redirect(BASEURL));
$dtCus = $objCustomer->getByID($_SESSION['userlogin']['id']);
echo $objFungsi->buatJudul('Profil Saya');
?>
<form method="POST" action="<?php BASEURL ?>proses/pelanggan.php?on=updatemyprofile">
	<table>
		<tr><td>Username</td>
			<td><input class="text_box_3" value="<?php echo $dtCus['username']; ?>" disabled="disabled"></td></tr>
		<tr><td>Nama</td>
			<td><input  value="<?php echo $dtCus['nama']; ?>" class="text_box_3" type="text" name="nama" /></td></tr>
		<tr><td>Telepon</td>
			<td><input value="<?php echo $dtCus['telepon']; ?>" class="text_box_3" type="text" name="telepon" /></td></tr>
		<input type="hidden" name="id" value="<?php echo $dtCus['id']; ?>">
		<tr><td>Email</td>
			<td><input value="<?php echo $dtCus['email']; ?>" class="text_box_3" type="text" name="email" /></td></tr>
		<tr><td>Kota</td>
			<td><input value="<?php echo $dtCus['kota']; ?>" class="text_box_3" type="text" name="kota" /></td></tr>
		<tr><td>Sex</td>
			<td><select class="text_box_3" name="jk">
				<option value="L" <?php echo ($dtCus['jk']=="L")?"selected='selected'":""; ?>>Laki-Laki</option>
				<option value="P" <?php echo ($dtCus['jk']=="P")?"selected='selected'":""; ?>>Perempuan</option>
			</select></td></tr>
		<tr><td>Alamat</td><td><textarea class="text_box_3" name="alamat"><?php echo $dtCus['alamat']; ?></textarea></td></tr>
		<tr><td>Tanggal Lahir</td><td><input value="<?php echo $dtCus['lahir']; ?>" class="text_box_3" type="text" name="lahir" /></td></tr>
		<tr><td>Member Sejak</td><td><input disabled="disabled" value="<?php echo $dtCus['waktu']; ?>" class="text_box_3" type="text"  /></td></tr>
		<tr><td colspan="2"><input type="submit" value="Update" onclick="return confirm('Update Data Pribadi Anda?')" /></td></tr>
	</table>	
</form>